export const informConfig = {
    useInfo: [
      {id: 1, value: '不动产(如房产、地产）购置/出售'},
      {id: 2, value: '房屋租金'},
      {id: 3, value: '个人同名账户转款/个人存款'},
      {id: 4, value: '境外生活日常开销'},
      {id: 5, value: '旅行'},
      {id: 6, value: '亲属资助'},
      {id: 7, value: '其他'}
    ],
    relationship: [
      {id: 1, value: '朋友'},
      {id: 2, value: '同学'},
      {id: 3, value: '同事'},
      {id: 4, value: '亲人'},
      {id: 5, value: '合作伙伴'},
      {id: 6, value: '本人'},
      {id: 7, value: '其他'},
    ],
    moneyType: [
      {id: 1, value: '美元'},
    ],
    remittanceType: [
      {id: 1, value: '个人'},
      {id: 2, value: '企业'},
    ],
};


export const pageConfig = [
  {
    type: 1,
    title: '汇入币种', 
    hint: '美元', 
    chooseData: informConfig.moneyType, 
    stateKey: 'showMoneyType',
    showBottomLine: true,
    choosedData: '美元'
  },
  {
    type: 2,
    title: '汇入金额', 
    hint: '请输入汇款金额', 
    chooseData: [], 
    stateKey: 'amount',
    showBottomLine: true,
    choosedData: ''
  },
  {
    type: 1,
    title: '汇入类型', 
    hint: '请选择', 
    chooseData: informConfig.remittanceType, 
    stateKey: 'showReceiverType',
    showBottomLine: true,
    choosedData: '个人'
  },
  {
    type: 2,
    title: '汇款人姓', 
    hint: '姓(英文)', 
    chooseData: [], 
    stateKey: 'firstName',
    showBottomLine: true,
    choosedData: ''
  },
  {
    type: 2,
    title: '汇款人名字', 
    hint: '名字(英文)', 
    chooseData: [],
    stateKey: 'lastName',
    showBottomLine: true,
    choosedData: ''
  },
  {
    type: 4,
    title: '汇款人国家', 
    hint: '请选择汇款人所在国家', 
    chooseData: [],
    stateKey: 'dealUserCountryCode',
    showBottomLine: true,
    choosedData: ''
  },
  {
    type: 1,
    title: '汇款用途', 
    hint: '请选择', 
    chooseData: informConfig.useInfo, 
    stateKey: 'showUse',
    showBottomLine: true,
    choosedData: ''
  },
  {
    type: 1,
    title: '与汇款人关系', 
    hint: '请选择', 
    chooseData: informConfig.relationship, 
    stateKey: 'showRelationship',
    showBottomLine: true,
    choosedData: ''
  },
]
  
export function findItemConfig(datas, value) { 
  let id = -1
  if(!datas) {
    return id
  }
  datas.forEach((item) => {
    if(item.value == value) {
      id = item.id
    }
  })
  return id
};
